<template>
  <view class="contianer">
	  <view class="header">
	    <view v-if="!headerObj.icon" class="headerImg"></view>
	    <img :src="headerObj.icon" v-if="headerObj.icon" class="itemImg" />
	    <view class="fw-bold">{{ headerObj.title }}</view>
	  </view>
	  <view class="headerList">
	    <view class="item">
	      <view class="itemNum fw-num" :style="headerObj.leftColor ? `color: ${headerObj.leftColor}` : ''">
	        {{ headerObj.leftNum }}
	      </view>
	      <view class="itemName">{{ headerObj.leftName }}</view>
	    </view>
	    <view class="item">
	      <view class="itemNum fw-num">{{ headerObj.centerNum }}</view>
	      <view class="itemName">{{ headerObj.centerName }}</view>
	    </view>
	    <view class="item">
	      <view class="itemNum fw-num">{{ headerObj.rightNum }} </view>
	      <view class="itemName">{{ headerObj.rightName }}</view>
	    </view>
	  </view>
  </view>
</template>
<script setup>
import { defineProps } from 'vue'
const props = defineProps({
pageType:{
	type:String,
	default:''
},
  headerObj: {
    type: Object,
    default: {}
  }
})
</script>
<style lang="scss" scoped>
	.contianer{
		display:block;
		margin-top:60px;
	}
.header {
  padding: 20px 15px;
  
  font-size: 16px;
  color: var(--ex-default-font-color);
  display: flex;
  .headerImg {
    width: 50px;
    height: 50px;
    background: var(--ex-div-bgColor3);
    border-radius: 5px 5px 5px 5px;
    margin-right: 10px;
  }
  .itemImg {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px 5px 5px 5px;
    margin-right: 10px;
  }
}
.headerList {
  padding: 0 15px 20px;
  display: flex;
  justify-content: space-between;
  .item {
    // flex: 1;
	display:flex;
	flex-direction: column;
	justify-content: center;
	
	
    .itemNum {
      font-size: 16px;
	    text-align: center;
      color: var(--ex-default-font-color);
    }
    .itemName {
      margin-top: 10px;
      font-size: 12px;
	  text-align: center;
      color: var(--ex-passive-font-color);
    }
  }
  .item:nth-child(2) {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .item:nth-child(3) {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }
}
</style>
